<template>
	<view class="padding" style="position: relative;">
		<view class="search" v-if="!showSearch">
			<view class="back"><image src="../../static/images/back_blue.png" class="back-icon"></image></view>
			<view class="title">我的订单</view>
			<image src="../../static/images/search.png" class="search-icon" @click="showSearch = true" ></image>
		</view>
		<view class="search" v-if="showSearch">
			<image src="../../static/images/search.png" class="search-icon" style="margin-left: 10px;"></image>
			<view style="width: calc(100% - 120px);"> 
						<u-input placeholder="单行输入" style="font-size: 20px;" placeholder-style="font-size:20px" fontSize="20" border="none" class="search-class" ></u-input>
			</view>
			<view class="cancel" @click="showSearch = false">取消</view>
		</view>
		
		<view class="box">
			<view class="box2" v-for="item in 5" @click="showItem(item)">
				<view class="row">
					<view class="img"></view>
					<view class="col-start" style="margin-left:15px ;width: calc(100% - 15px - 80px - 15px);">
						<view class="name">商品名称</view>
						<view class="row-between" style="width: calc(100%);margin-top: 10px;">
							<view class="type">型号:</view>
							<view class="type">X数量</view>
						</view>
						<view  class="type">xxxxxx</view>
					</view>
				</view>
				<view class="row-between" style="margin-top: 8px;">
					<view class="status">状态：已发货</view>
					<view class="price">实付款 ¥168</view>
				</view>
				<view class="transfer">快递单号：12133</view>
			</view>
		
		</view>
		
		<view class="bottom" v-if="!showSearch">
			<view class="bottom-item" :style="{color:(clickType == 1 ? '#000' : '#fff')}" @click="clickType =1 ">
				待发货
			</view>
			<view class="line-white"></view>
				<view class="bottom-item" :style="{color:(clickType == 0 ? '#000' : '#fff')}" @click="clickType =0 ">
				全部
			</view>
			<view class="line-white"></view>
				<view class="bottom-item" :style="{color:(clickType == 2 ? '#000' : '#fff')}" @click="clickType =2 ">
				待收货
			</view>
		</view>
		
		
		<u-popup :show="showPop" overlayStyle="background:rgba(255, 255, 255, 0.5)" bgColor="transparent"
			:closeOnClickOverlay="true" @close="close()">
			<view class="col" style="background-color: rgba(255, 255, 255, 0.5);">
				<view class="pop-p" style="background-color: transparent;">
					<view class="pop-buy" style="z-index: 1000;"></view>
					<view class="pop" style="margin-top: -130px;">
						<view class="pop-name">
							商品名称
						</view>
						<view class="row-between" style="margin-top: 5px;">
							<view class="pop-type">
								型号:<br>xxxxx
							</view>
							<view class="col" style="margin-top: 5px;">
								<view class="pop-type">
									单价 ¥84
								</view>
								<view class="row-end pop-type">
									x2
								</view>
							</view>
						</view>
					
					<view class="pop-price">实付款 ¥168</view>
					<view class="time">下单日期 2022-03-03	</view>
					<view class="pop-status">
						<view class="pop-type" >状态：待发货</view>
						<view class="pop-type" style="margin-top: 5px;">预计20222发货</view>
					</view>
					</view>
					<view class="row-center" style="margin-top: -30px;" @click="showPop = false">
						<view class="red-cicle">
							<image src="../../static/images/order_back.png" class="search-icon2"></image>
						</view>
					</view>
				</view>
				<view style="height: 30px;"></view>
			</view>
		</u-popup>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				showSearch:false,
				clickType:0,
				showPop:false
			}
		},
		onLoad(option) {
			
			this.clickType = option.type
		},
		methods: {
			showItem(item){
				this.showPop = true
			}
		}
	}
</script>

<style lang="scss" scoped>
	
	
	.pop-name{
		margin-top: 140px;
		color: rgba(16, 16, 16, 1);
		font-size: 28px;
		text-align: left;
		font-family: ZKKuaiLeTi-regular;
	}
	
	.pop-type{
		color: rgba(79, 79, 79, 1);
		font-size: 16px;
		text-align: left;
		font-family: ZKKuaiLeTi-regular;
	}
	
	.pop-price{
			margin-top: 10px;
		color: rgba(189, 49, 36, 1);
		font-size: 28px;
		text-align: right;
		font-family: ZKKuaiLeTi-regular;
	}
	
	.pop-time{
		margin-top: 10px;
		color: rgba(79, 79, 79, 1);
		font-size: 16px;
		text-align: center;
		font-family: ZKKuaiLeTi-regular;
	}
	.pop-status{
		padding-top: 10px;
		padding-bottom: 5px;
		margin-top: 10px;
		margin-bottom: 40px;
		line-height: 20px;
		border-radius: 20px;
		background-color: rgba(255, 255, 255, 1);
		color: rgba(16, 16, 16, 1);
		font-size: 14px;
		text-align: center;
		font-family: Arial;
		border: 3px solid rgba(79, 79, 79, 1);
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	
	.green-circle {
		margin-right: 40px;
		width: 60px;
		height: 60px;
		line-height: 20px;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 50%;
		background-color: rgba(129, 179, 55, 1);
		text-align: center;
		border: 5px solid rgba(79, 79, 79, 1);
	}
	
	.red-cicle {
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 60px;
		height: 60px;
		line-height: 20px;
		background-color: rgba(254, 121, 74, 1);
		text-align: center;
		border: 5px solid rgba(79, 79, 79, 1);
	}
	
	.pop-p {
		display: flex;
		flex-direction: column;
		align-items: center;
		position: relative;
	}
	
	.pop {
		
		width: calc(100% - 90px);
		line-height: 20px;
		border-radius: 25px;
		background-color: rgba(255, 255, 255, 1);
		color: rgba(16, 16, 16, 1);
		font-size: 14px;
		text-align: center;
		font-family: Arial;
		border: 3px solid rgba(79, 79, 79, 1);
		display: flex;
		flex-direction: column;
		padding-left: 20px;
		padding-right: 20px;
	}
	
	.pop-goods-img {
		margin-top: 14px;
		width: 330px;
		height: 330px;
		border-radius: 15px 15px 0 0;
		background-color: red;
	}
	
	
	
	.pop-buy {
		width: 260px;
		height: 260px;
		line-height: 20px;
		border-radius: 25px;
		text-align: center;
		border: 3px solid rgba(79, 79, 79, 1);
		display: flex;
		align-items: center;
		justify-content: center;
	}
	
	.pop-back {
		width: 120px;
		height: 60px;
		line-height: 20px;
		border-radius: 20px;
		background-color: rgba(255, 191, 107, 1);
		text-align: center;
		border: 4px solid rgba(79, 79, 79, 1);
	}
	
	.pop-ccategory {
		position: relative;
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	
	.pop-content {
		height: 410px;
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	
	.pop-item {
		margin-left: 35px;
		margin-top: 20px;
		color: rgba(16, 16, 16, 1);
		font-size: 20px;
		text-align: left;
		font-family: ZKKuaiLeTi-regular;
	}
	
	.pop-end {
		margin-top: 32px;
		color: rgba(16, 16, 16, 1);
		font-size: 28px;
		text-align: right;
		font-family: ZKKuaiLeTi-regular;
	}
	
	
	
	
	.bottom{
		margin-left: 75px;
		display: flex;
		position: fixed;
		width: calc(100% - 150px);
		bottom: 74px;
		height: 40px;
		line-height: 20px;
		border-radius: 15px;
		background-color: rgba(233, 157, 66, 0.85);
		text-align: center;
		border: 3px solid rgba(79, 79, 79, 1);
		align-items: center;
	}
	.bottom-item{
		width: 33%;
		padding: 8px 12px;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.bottom-white{
		color: white;
	}
	.bottom-black{
		color: black;
	}
	.line-white{
		width: 2px;
		height: 30px;
		background-color: #F8F8F8;
	}
	.box{
		margin-top: 19px;
		line-height: 20px;
		border-radius: 25px;
		background-color: rgba(255, 255, 255, 1);
		color: rgba(16, 16, 16, 1);
		font-size: 14px;
		text-align: center;
		font-family: Arial;
		border: 3px solid rgba(79, 79, 79, 1);
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	.box2{
		margin-top: 20px;
		margin-left: 25px;
		margin-right: 25px;
		width: calc(100% - 50px);
		height: 160px;
		line-height: 20px;
		border-radius: 20px;
		background-color: rgba(255, 255, 255, 1);
		color: rgba(16, 16, 16, 1);
		font-size: 14px;
		text-align: center;
		font-family: Arial;
		border: 3px solid rgba(79, 79, 79, 1);
		padding: 10px 15px;
	}
	
		.img{
			width: 80px;
			height: 80px;
			border-radius: 10px;
			border: 3px solid rgba(79, 79, 79, 1);
			width: 80px;
			height: 80px;
		}
		.name{
			font-family: HappyZcool-2016;
			color: rgba(16, 16, 16, 1);
			font-size: 20px;
			text-align: left;
		}
		.type{
				font-family: HappyZcool-2016;
			color: rgba(79, 79, 79, 1);
			font-size: 14px;
			text-align: left;
		}
		.status{
				font-family: HappyZcool-2016;
			color: rgba(79, 79, 79, 1);
			font-size: 20px;
			text-align: left;
		}
		.price{
				font-family: HappyZcool-2016;
			color: rgba(189, 49, 36, 1);
			font-size: 18px;
			text-align: right;
		}
		.transfer{
				font-family: HappyZcool-2016;
			margin-top: 10px;
			color: rgba(79, 79, 79, 1);
			font-size: 14px;
			text-align: left;
		}
	.padding {
		margin-top: 10px;
		padding-left: 20px;
		padding-right: 20px;
	}
.search{
	height: 60px;
	line-height: 20px;
	border-radius: 25px;
	background-color: rgba(255, 255, 255, 1);
	color: rgba(16, 16, 16, 1);
	font-size: 14px;
	text-align: center;
	font-family: Arial;
	border: 3px solid rgba(79, 79, 79, 1);
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.back{
	margin-left: 10px;
	width: 40px;
	height: 40px;
	background-color: rgba(147, 210, 243, 1);
	text-align: center;
	border: 3px solid rgba(79, 79, 79, 1);
	display: flex;
	border-radius: 50%;
	align-items: center;
	justify-content: center;
}
.title{
	color: rgba(79, 79, 79, 1);
	font-size: 28px;
	text-align: center;
font-family: HappyZcool-2016;
}
.search-icon{
	width: 40px;
	height: 40px;
	margin-right: 10px;
}
.search-icon2{
	width: 40px;
	height: 40px;
}
.back-icon{
	width: 19px;
	height: 19px;
}
.cancel{
	white-space:nowrap;
	margin-right: 10px;
	color: rgba(64, 149, 229, 1);
	font-size: 28px;
	text-align: center;
font-family: HappyZcool-2016;
margin-right: 30px;
}
.cancel-red{
	margin-right: 10px;
	color:#E99D42 ;
	font-size: 28px;
	text-align: center;
font-family: HappyZcool-2016;
}
</style>
